{% extends "front/front_base.html" %}
{% from "common/_macros.html" import static %}

{% block title %}
    发布帖子
{% endblock %}

{% block head %}
    <script src="{{ static("ueditor/ueditor.config.js" )}}"></script>
    <script src="{{ static("ueditor/ueditor.all.min.js") }}"></script>
    <script src="{{ static("front/js/apost.js") }}"></script>
{% endblock %}

{% block body %}
    <form action="" method="post">
        <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
        <div class="form-group">
            <div class="input-group">
                <span class="input-group-addon">标题</span>
                <input type="text" class="form-control" name="title" placeholder="请输入标题">
            </div>
        </div>
        <div class="form-group">
            <div class="input-group">
                <span class="input-group-addon">板块</span>
                <select name="board_id" class="form-control" >
                    {% for board in boards %}
                        <option value="{{ board.id }}">{{ board.name }}</option>
                    {% endfor %}
                </select>
            </div>
        </div>

        <div class="form-group">
            <script class="editor" id="editor" type="text/plain" style="height: 500px;"></script>
        </div>

        <div class="form-group">
            <button class="btn btn-danger"id="submit-btn" >发布帖子</button>
        </div>
    </form>
{% endblock %}